package com.cloud.demo2020.service;

import com.cloud.demo2020.common.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "code-service", fallback = CodeServiceImpl.class)
public interface CodeService {
    @RequestMapping("/code/create/{email}")
    ResultBean create(@PathVariable("email") String email);
    @RequestMapping("/code/valid/{email}/{code}")
    ResultBean valid(@PathVariable("email") String email, @PathVariable("code") String code);
}
